package cs236703.winter2013.hw4.solution;
import cs236703.winter2013.hw4.provided.JResult;

public class JResultClass implements JResult {
		private JTestResult result;
		private String message;
		
		public JResultClass(JTestResult res, String msg) {
			result = res;
			message = msg;
		}
		
		@Override
		public JTestResult getResultType() {
			return result;
		}

		@Override
		public String getMessage() {
			return message;
		}
		
		@Override
		public boolean equals(Object obj) {
			return ((this.getClass().equals(obj.getClass())) && 
					(this.getResultType() == ((JResult) obj).getResultType()) && 
					(this.getMessage().equals(((JResult) obj).getMessage())));
		}
	}